#encoding = utf-8

import pytest
import requests
import json

from shargeApi.config import *
from shargeApi.login import LoginAPI
import allure

@allure.epic("sharge")
@allure.feature("get-code")
class Testusrmode:


    def setup(self):

        pass

    def teardown(self):
        pass

    @allure.title("获取验证码")
    def test01_sign(self):
        url = url_sign
        json_data = {"msgType":"9","area":"86","mobile":"15361441154"} #msgtype区分不同的类型：注册 登陆 修改密码
        jsondata= json.dumps(json_data)
        headers = {"Content-Type":"application/json"}
        res = requests.post(url = url,data = jsondata.encode('utf-8'),  headers=headers)

        result = json.loads(res.text)
        print("\n---------",result)


